<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .one{
            color:red;
        }
        .two{
            color:blue;
        }
    </style>
    <script>
        function jumpPage(){
            //跳转指定页面
            location.href = "b.html?id=23&name=tom";
        }

        function changeClass(){
            var divObj = document.getElementById("mydiv");
            //改变class属性，需要用className
            divObj.className = "two";
        }
    </script>
</head>
<body>
    <a href="form.html">跳转</a>
    <input type="button" value="跳转" onclick="jumpPage()"><br>

    <div id="mydiv" class="one">div内容</div>
    <input type="button" value="改变class" onclick="changeClass()">
</body>
</html>